<?php

/**
* Project Class
*/
class Project extends AppModel
{
	var $name = 'Project';
	var $recursive = 2;	
	
	var $hasMany = array('Document' =>
	                         array('className'     => 'Document',
	                               'conditions'    => '',
	                               'order'         => '',
	                               'limit'         => '5',
	                               'foreignKey'    => 'project_id',
	                               'dependent'     => true,
	                               'exclusive'     => false,
	                               'finderQuery'   => ''
	                         ),
						'Batch' =>
							array('className'     => 'Batch',
	                               'conditions'    => '',
	                               'order'         => '',
	                               'limit'         => '',
	                               'foreignKey'    => 'project_id',
	                               'dependent'     => true,
	                               'exclusive'     => false,
	                               'finderQuery'   => ''
	                         ),
						'Role' =>
							array('className'     => 'Role',
	                               'conditions'    => '',
	                               'order'         => '',
	                               'limit'         => '',
	                               'foreignKey'    => 'project_id',
	                               'dependent'     => true,
	                               'exclusive'     => false,
	                               'finderQuery'   => ''
	                         )								 					 
	                  );

	var $belongsTo = array('Company' =>
                           array('className'  => 'Company',
                                 'conditions' => '',
                                 'order'      => '',
                                 'foreignKey' => 'company_id'
                           )
                     );

	var $hasOne = array('Gescom' =>
	                        array('className'    => 'Gescom',
	                              'conditions'   => '',
	                              'order'        => '',
	                              'dependent'    =>  true,
	                              'foreignKey'   => 'project_id'
	                        )
	                  );
					 
	var $validate = array(
	  'name' => VALID_NOT_EMPTY,
	  'contract_id' => VALID_NUMBER,
	  'company_id' => VALID_NOT_EMPTY,
	  'smileDP' => VALID_NOT_EMPTY,
	  'smileCP' => VALID_NOT_EMPTY
	);				 
}

?>